var R = require('ramda')
let IO = function(f) { this.unsafePerformIO = f }
IO.of = function(x) { return new IO(() => x)}
IO.prototype.map = function(f) {return new IO(R.compose(f, this.unsafePerformIO))}
IO.prototype.join = function() { return this.unsafePerformIO() }
IO.prototype.chain = (f)=> this.map(f).join()
exports.IO = IO